package main

//变量练习

import "fmt"

var (
	a int
	b bool
)

var c, d int = 1, 2
var e, f = 123, "hello"

func main() {
	a = 11111
	b = false
	fmt.Println(a, b)
	fmt.Println(c, d)
	fmt.Println(e, f)
	temp();
	fmt.Println("------常量-------")
	constFunc()
}
func temp(){
	e = 333333
	f="xxx()"
	g :="ggg"
	fmt.Println(e,f)
	fmt.Println(g)
}

//------------
//常量
const(
	Unknow = 0
	Male = 1
	FeMale = 2
)

const(
	consta = iota
	constb = iota
	constc = iota
)
const (
	i=1<<iota
	j=3<<iota
	k
	l
)


func constFunc(){

	const LENGTH int = 1
	const NAME string ="name"

	fmt.Println(LENGTH,NAME)
	fmt.Println(Male)
	if(LENGTH == Male){
		fmt.Println("male")
	}

	fmt.Println("------iota-----")
	fmt.Println(consta,constb,constc)
	fmt.Println("------<<iota-----")
	fmt.Println(i,j,k,l)


}
